package com.company.project.controller;

import com.company.project.core.Result;
import com.company.project.core.ResultGenerator;
import com.company.project.dao.LoginMapper;
import com.company.project.model.Login;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import tk.mybatis.mapper.entity.Condition;

import java.util.List;

@RestController
@RequestMapping("/handle")
public class HandleController {
    @Autowired
    private LoginMapper loginMapper;

    @GetMapping("/list")
    public Result getLoginList(Login login) {
        List<Login> list = loginMapper.getList(login);
        return ResultGenerator.genSuccessResult(list);
    }
}
